package tjs.study.notes.alibaba.user;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.core.env.Environment;

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class TjsUserApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(TjsUserApplication.class, args);
    }

    @Autowired
    private Environment environment;


    @Override
    public void run(String... args) throws Exception {
        System.out.println("spring.application.name :" + environment.getProperty("spring.application.name"));
        System.out.println("xxl.job.executor.logpath :" + environment.getProperty("xxl.job.executor.logpath"));
        System.out.println("test.nacos.user :" + environment.getProperty("test.nacos.user"));
        System.out.println("test.nacos.common.public :" + environment.getProperty("test.nacos.common.public"));
        System.out.println("test.nacos.common :" + environment.getProperty("test.nacos.common"));
    }
}
